package com.anji.plus.gaea.inf.util;

import com.anji.plus.gaea.inf.exception.InfException;

/**
 * @author ultrajiaming
 * @since 2021/3/19 10:23
 */
public class InfAssert {

    public static void notNull(Object param, String code, Object... args) {
        if (null == param)
            throw InfException.code(code).args(args);
    }

    public static void notEmpty(String param, String code, Object... args) {
        if (null == param || "".equals(param.trim()))
            throw InfException.code(code).args(args);
    }

    /**
     * 不能为真
     **/
    public static void isTrue(boolean con, String code, Object... args) {
        if (con)
            throw InfException.code(code).args(args);
    }

}
